package lt.web.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lt.web.mapper.BackendUserMapper;
import lt.web.pojo.BackendUser;
import lt.web.service.BackendUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BackendUserServiceImpl extends ServiceImpl<BackendUserMapper, BackendUser> implements BackendUserService {
    @Autowired
    BackendUserMapper backendUserMapper;

    @Override
    public BackendUser loginByCodeAndPassword(String userCode, String userPassword) {
        QueryWrapper queryWrapper =new QueryWrapper();
        queryWrapper.eq("userCode",userCode);
        queryWrapper.eq("userPassword",userPassword);
        return backendUserMapper.selectOne(queryWrapper);
    }
}
